URLs Field Capabilities

Index:

 Standard Capabilities

The URL field can execute any valid URL, for which you have defined a protocol handler. On most systems at least the http://, ftp:// and mailto: protocols are defined, but KeePass supports all registered protocols which the Internet Explorer supports.

So, if you globally (i.e. using the Windows Explorer) register PuTTY for ssh:// URLs, KeePass will automatically use PuTTY for ssh:// URLs, too. KeePass uses the same settings as Windows and Internet Explorer do.



 Executing command-lines

Instead of an URL, you can also execute command-lines. To tell KeePass that the data you entered is a command-line, prefix it using cmd://. If you would like to execute Notepad, your URL could look like this:

cmd://C:\WinNT\Notepad.exe C:\Test\MyTestFile.txt

The virtual cmd:// protocol also supports parameters for executed applications, in contrast to the file:// protocol. This was the main reason why cmd:// was introduced, with file:// you aren't able to pass any parameters to started applications. Use the cmd:// protocol instead.

The paths for the cmd:// protocol don't need to be encoded. For example, you do not have to replace space characters by %20, as it is normally required for other URLs. KeePass just cuts away the cmd:// virtual protocol prefix and passes the remaining command-line to Windows.



 Substitutions

In the URL field, you can use several special strings that will get automatically replaced when the URL is executed. An example:

http://www.yoursite.com/default.php?user=%USERNAME%&pass=%PASSWORD%

For this entry, KeePass will replace %USERNAME% by the data of the username field and %PASSWORD% by the data in the password field when you execute the link.

The following substitutions are available:

FieldCode
Title field{TITLE} or %TITLE%
Username field{USERNAME} or %USERNAME%
URL field{URL} or %URL%
Password field{PASSWORD} or %PASSWORD%
Notes field{NOTES} or %NOTES%
Current application directory path{APPDIR} or %APPDIR%

The {APPDIR} and %APPDIR% substitution codes are replaced by the application directory path of the currently running KeePass instance. It's the full absolute path of the directory containing the KeePass executable, without a trailing backslash. If you would like to start a new KeePass instance, you could set the URL to:

cmd://{APPDIR}\KeePass.exe